Skip to content

feat: ability to verify e2e STARK proof + CLI command #1689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 27, 2025

Conversation

stephenh-axiom-xyz
Copy link
Contributor

Resolves INT-4064

This comment has been minimized.

@@ -322,6 +326,51 @@ impl<E: StarkFriEngine<SC>> GenericSdk<E> {
Ok(proof)
}

pub fn verify_e2e_stark_proof(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking

pub fn verify_segments<SC, E>(
as an example and see what's missing.

&self,
agg_stark_pk: AggStarkProvingKey,
proof: &VmStarkProof<SC>,
) -> Result<[F; CHUNK]> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return AppExecutionCommit instead of just exe commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vm_commit should be internal_committed_exe.get_program_commit()? Or should I get the program commit from the root verifier program?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the program commit of leaf verifier or a public value of internal verifier. See here:

non_leaf_verifier.verify_internal_or_leaf_verifier_proofs(&mut builder, &proofs);

This comment has been minimized.

This comment has been minimized.

Copy link

group app.proof_time_ms app.cycles app.cells_used leaf.proof_time_ms leaf.cycles leaf.cells_used
verify_fibair (+9 [+0.8%]) 1,141 334,023 17,675,870 - - -
fibonacci (+11 [+0.4%]) 2,482 1,500,277 50,589,503 - - -
regex (+98 [+1.3%]) 7,475 4,165,226 166,511,152 - - -
ecrecover (-36 [-2.6%]) 1,352 (+20412 [+7.1%]) 309,859 (+672913 [+4.7%]) 15,143,099 - - -
pairing (-86 [-1.9%]) 4,473 (+36796 [+2.0%]) 1,857,232 (+1223114 [+1.3%]) 97,055,521 - - -

Commit: e7c6611

Benchmark Workflow

@stephenh-axiom-xyz stephenh-axiom-xyz merged commit 9684e3b into feat/prove-default-name May 27, 2025
25 checks passed
@stephenh-axiom-xyz stephenh-axiom-xyz deleted the feat/cli-verify-stark branch May 27, 2025 22:35
stephenh-axiom-xyz added a commit that referenced this pull request May 27, 2025
Resolves INT-4074. Primarily accomplishes the following:

- `cargo openvm prove` outputs proofs to `${bin_name}.app.proof` instead
of `app.proof`, where `bin_name` is the file stem of the executable
(same for `stark` and `evm`)
- `cargo openvm verify` by default searches the working directory for
files with extension `.app.proof`

Additionally, the following are also in this PR:

- `cargo openvm init ${dir}` creates directory `dir` if it doesn't
already exist
- Updates to the book to reflect recent CLI changes

The following were merged from #1689:

- SDK functionality to verify e2e STARK proofs
- `cargo openvm verify stark` subcommand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants